import request from '@/utils/request'

// 查询礼包兑换记录列表
export function listHpsGiftExchange(query) {
  return request({
    url: '/hps/HpsGiftExchange/list',
    method: 'get',
    params: query
  })
}

// 查询礼包兑换记录详细
export function getHpsGiftExchange(id) {
  return request({
    url: '/hps/HpsGiftExchange/' + id,
    method: 'get'
  })
}

// 新增礼包兑换记录
export function addHpsGiftExchange(data) {
  return request({
    url: '/hps/HpsGiftExchange',
    method: 'post',
    data: data
  })
}

// 修改礼包兑换记录
export function updateHpsGiftExchange(data) {
  return request({
    url: '/hps/HpsGiftExchange',
    method: 'put',
    data: data
  })
}

// 删除礼包兑换记录
export function delHpsGiftExchange(id) {
  return request({
    url: '/hps/HpsGiftExchange/' + id,
    method: 'delete'
  })
}

// 导出礼包兑换记录
export function exportHpsGiftExchange(query) {
  return request({
    url: '/hps/HpsGiftExchange/export',
    method: 'get',
    params: query
  })
}

// 批量兑换成功
export function exchangePass(id) {
  return request({
    url: '/hps/HpsGiftExchange/exchangePass/'+ id,
    method: 'put'
  })
}
